<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>巡检新增</title>
		<link rel="stylesheet" href="../../js/plugins/layui-v2.4.5/layui/css/layui.css" />
		<link rel="stylesheet" href="../../css/reset.css" />
		<link rel="stylesheet" href="../../css/form.css" />
		<style>
		</style>
	</head>
	<body class="p10">
		<div class="container p15">
			<div class="header">
				<h2>添加巡检计划</h2>
			</div>
			<div class="content-scroll layui-form">
				<div class="layui-row ">
					<div class="layui-inline">
						<label class="layui-form-label">计划名称</label>
						<div class="layui-input-inline">
							<input type="text" name="" autocomplete="off" class="layui-input">
						</div>
					</div>
				</div>
				<div class="layui-row ">
					<div class="layui-inline">
						<label class="layui-form-label">巡检频率</label>
						<div class="layui-input-inline">
							<input type="text" name="" autocomplete="off" class="layui-input">
						</div>
					</div>
				</div>
				<div class="layui-row ">
					<div class="layui-inline">
						<label class="layui-form-label">巡检周期</label>
						<div class="layui-input-inline">
							<input type="text" class="layui-input" id="test1"  autocomplete="off" placeholder=" ~ ">
						</div>
					</div>
				</div>
				<div class="layui-row ">
					<div class="layui-inline">
						<label class="layui-form-label">无需巡检时间</label>
						<div class="layui-input-inline">
							<input type="text" class="layui-input" id="test2"  autocomplete="off" placeholder=" ~ ">
						</div>
					</div>
				</div>
				<div class="layui-row ">
					<label class="layui-form-label">巡检位置</label>
					<div class="layui-input-inline" >
						<input type="radio" name="position" value="jifang" title="机房" checked lay-filter="position">
						<input type="radio" name="position" value="qita" title="其它" lay-filter="position">
					</div>
				</div>
				<div class="layui-row">
					<label class="layui-form-label"></label>
					<div class="layui-input-inline" id="jfChecked" style="width: 220px;">
						<select name="type" lay-verify=""  >
						  <option value="">请选择</option>
						  <option value="0">月</option>
						  <option value="1">周</option>
						  <option value="2">天</option>
						  <option value="3">小时</option>
						</select> 
					</div>
					<div class="layui-input-inline" id="qtChecked" style="display: none;width: 220px;">
						<input type="text" name="" autocomplete="off" class="layui-input" placeholder="请输入">
					</div>
				</div>
				
				<div class="layui-row save-btns">
					<a href="javascript:;" class="layui-btn  layui-btn-normal">保存</a>
					<a href="javascript:;" class="layui-btn  layui-btn-primary">关闭</a>
				</div>
			</div>
		</div>

		<script src="../../js/jquery-3.3.1.min.js"></script>
		<script src="../../js/plugins/layui-v2.4.5/layui/layui.js"></script>
		<script>
			$(function(){
				layui.use(['form', 'laydate'], function() {
					var form = layui.form,laydate = layui.laydate;
					laydate.render({
						elem:'#test1',
						range:'~'
					})
					laydate.render({
						elem:'#test2',
						range:'~'
					})
					form.on('radio(position)',function(d){
						if(d.value == 'jifang'){
							$("#jfChecked").show().next().hide();
						}else{
							$("#qtChecked").show().prev().hide();
						}
					})
				})
			})
		</script>
	</body>
</html>
